/*
 * @Author: Jimmy
 * @LastModifiedBy: Jimmy
 * @Date: 2024-02-24 16:11:07
 * @LastEditTime: 2024-02-24 16:28:59
 * @FilePath: /react-vite-admin/src/components/lazyLoader/index.tsx
 */
import React, { Suspense } from 'react'
import Spinner from '../spinner'

const LazyLoader = (Comp: React.LazyExoticComponent<() => JSX.Element>) => {
    return (
        <Suspense fallback={<Spinner/> }>
        {/* <Suspense> */}
            <Comp />
        </Suspense>
    )
}

export default LazyLoader